home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / QnA-compilers < prev    next >
Encoding:
Text File  |  1994-08-02  |  77.3 KB  |  2,192 lines

  1.  
  2.  
  3.                  ~4Dgifts/toolbox/src/swtools/QnA-compilers
  4.  
  5.   `!' indicates new or updated as of version 4.1
  6.  
  7.   This file contains Question-and-Answer messages saved out from internal and
  8.   external newsgroups including comp.sys.sgi.graphics/comp.graphics.opengl/
  9.   comp.sys.sgi.apps/comp.sys.sgi.misc/comp.sys.sgi/sgi.engr.all/sgi.engr.dev.
  10.   while they are not necessarily *Frequently* asked questions, it is felt they 
  11.   potentially contain information useful to developers.  
  12.   
  13.   This file includes QnAs relating to the area of compilers:
  14.  
  15.  
  16.   # 1.  getting ugen error compiling even simple code in Fortran
  17. ! # 2.  is there a list of binary compat mode 
  18.         exceptions for 4.0.5 binaries running on 5.1?
  19.   # 3.  Is it reasonable to expect that if __STDC__ is 
  20.         defined to be long double it will be supported?
  21.   # 4.  'mkshlib' command:  trying to create a shared library
  22.   # 5.  where did logname() go in 5.1 Irix?
  23.   # 6.  why does fflush call itself so often?
  24.   # 7.  when will I see 64 bits?
  25.   # 8.  will SGI's C++ compiler include exception handling?
  26.   # 9.  when were the C preprocessor symbols "sgi" & "_sgi" introduced?
  27.   #10.  getting "undefined" errors again with C++ linking
  28.   #11.  FORTRAN Intrinsic Function Generic Name. Is the Manual Wrong?
  29.   #12.  Can one do Parallel processing without Power C?
  30.   #13.  What the IRIX 64bit implementation be of 
  31.         variable declarations for c and c++ ?
  32.   #14.  variable length arglist problem
  33.   #15.  SGI's policy re:  the Delta C++ compiler?
  34.   #16.  Usinit et al. disturbs real-time-ness
  35.   #17.  how do i call a C++ member function from within dbx?
  36.   #18.  Why does ld add -lX11_s when it sees -lgl_s ?
  37.   #19.  lex question re: yywrap()
  38.   #20.  R4000 and R4200 and instruction caching
  39.   #21.  is there a way to link COFF & ELF objects together under 5.1?
  40.   #22.  using "-D__STDC__=1":  struct sigcontext not included in compilation
  41.   #23.  getting "illegal member use" ?
  42.   #24.  trouble accessing /debug/nnnnn files via ioctl()
  43.   #25.  Lisp still failing with ""contiguous jump problem" in 5.1
  44.   #26.  can't find ELF object file access library
  45.   #27.  strange messages from linker 
  46.         (vt_Atom_vts: both a large and small symbol)
  47.   #28.  what is the current version for CC?
  48.   #29.  Format of pixie(1) trace files?
  49.   #30.  is there an already-compiled version of gcc for the SGI r4k?
  50.   #31.  gp problem:  overflowing the "small-data" area
  51.   #32.  accessing int, short, char bitfield and alignment issues
  52.   #33.  assembly question:  version stamp
  53.   #34.  how can I access/interpret the stack from within a program?
  54.   #35.  ELF/COFF 4.0.5X compatibility library for 5.1.1?
  55.   #36.  times when necessary to use the -static flag when compiling with f77
  56. ! #37.  what's the difference the abi and irix libs?
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. # 1.  getting ugen error compiling even simple code in Fortran
  64. -------------------------------------------------------------
  65. Newsgroups: comp.sys.sgi.misc
  66. From: davea@quasar.mti.sgi.com (David B.Anderson)
  67. Subject: Re: Fortran trouble
  68. Organization: Silicon Graphics, Inc.  Mountain View, CA
  69. Date: Thu, 9 Sep 1993 17:05:23 GMT
  70.  
  71. In article <1993Sep9.005017.10442@brl.mil> Mike Whittaker <MIKE@scripps.edu> writes:
  72. >I am having trouble compiling even *very simple* code in fortran. I get
  73. >a ugen error and a core dump. When I say simple, I mean
  74. >    print*,'hello'
  75. >    end
  76. >That kind of simple. Any suggestions? I am running an R4k indigo with
  77. >Irix 4.0.5F, fortran 3.4.1, and the 3.4.4 maintenance fortran release.
  78.  
  79. You've gotten an f77 and back end(uopt,ugen) which are mismatched.
  80.  
  81. See the output of:
  82. versions -Ivb dev maint_dev ftn maint_ftn
  83.  
  84. What works:
  85. f77 3.4.1 goes with dev/ido 4.0.1 ("2.40" compilers)
  86. f77 3.5   goes with dev/ido 4.1   ("3.10" compilers) (replaced by 3.10.1)
  87. f77 3.5.1 goes with dev/ido 4.1.1 ("3.10.1" compilers)
  88.  
  89. You may need to contact the support folks to understand the right
  90. installation order to get things working again...
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97. # 2.  is there a list of binary compat mode 
  98.       exceptions for 4.0.5 binaries running on 5.1?
  99. ------------------------------------------------------------
  100. Newsgroups: sgi.engr.devp
  101. Subject: Re: 4.0.5 to 5.1 compat issues...
  102. Date: 22 Sep 1993 01:24:11 GMT
  103. Organization: Silicon Graphics, Inc., Mountain View, CA
  104. Lines: 354
  105.  
  106. >ok, so is there a reasonbly exhaustive list of binary compat mode exceptions
  107. >for 4.0.5 binarys running on 5.1?  if so, where can i get a copy?
  108.  
  109.  
  110. This was recently posted to the various support mailing lists from
  111. the back-line support group in CSD.  Have fun..
  112.  
  113.  
  114. *****************************************************************************
  115.             CUSTOMER SERVICES ENGINEERING
  116.              FOR YOUR INFORMATION ONLY!
  117. *****************************************************************************
  118.  
  119.                    IRIX4 Compatibility With IRIX5
  120.                                 by
  121.                           Dave Frederick
  122.  
  123.  
  124. ------------------------------------------------------
  125. Binary Compatibilty between IRIX5 and IRIX4
  126. ------------------------------------------------------
  127.  
  128. Almost all IRIX 4.0.X binaries will run on IRIX 5.x.   Because of
  129. some restructuring of IRIX for SVR4 compliance, there are instances
  130. where application code will need to be either recompiled or in some
  131. cases recoded.  Instances where code changes are required include:
  132.  
  133.    - Programs which read from /dev/kmem will need to use /proc instead.
  134.  
  135.    - Programs that use /debug, like dbx and cvd (WorkShop), will need to
  136.      use /proc instead.
  137.  
  138.    - Generally, any products that involve device drivers (e.g. add-on
  139.      boards, some communications products) or other kernel components,
  140.      such as STREAMS modules, must be re-released for IRIX 5.1.
  141.  
  142.    - Programs not compiled with shared versions of the libraries; for
  143.      example, libfm.a and libgl.a instead of libfm_s.a and libgl_s.a.
  144.      These programs would need to be relinked with the shared versions
  145.      either under IRIX4 or the IRIX4 compatibility mode of IRIX5.
  146.  
  147.    - For execution on Challenge and Onyx systems, multi-processor programs
  148.      that linked in libmpc.a (-lmpc) explicitly or that have been generated
  149.      using the Power C or Power Fortran analyzers need to be re-linked under
  150.      4.1.1 IDO on 4.0.5x IRIX or re-linked under IRIX4 compatibility mode on
  151.      IRIX5 or fully compiled and linked using the IRIX5 compilers and libraries
  152.      to take advantage of multiple processors on the new R4400 multiprocessor
  153.      systems supported by IRIX5.  Executables of such programs operate
  154.      correctly on IRIX5 Challenge or Onyx MP environments, but they run only
  155.      on a single processor.  This is because new synchronization mechanisms
  156.      are used on the R4400 MP systems.  Those with Power Series systems with
  157.      IRIX5 installed will not need to relink MP binaries with -lmpc on IRIX5;
  158.      4.0.x MP binaries will continue to work in MP fashion on ALL machines
  159.      except Challenge and Onyx.
  160.  
  161. SVR4 ABI binaries will run without any changes.
  162.  
  163. ------------------------------------------------------
  164. Object Compatibilty between IRIX5 and IRIX4
  165. ------------------------------------------------------
  166.  
  167. Due to the new binary format used in IRIX 5.x, ELF, object files
  168. created under IRIX 4.0.X (COFF format) cannot be linked with IRIX 5.x
  169. compiled code.  Given the existence of many third party libraries
  170. which will not have been compiled under 5.x, the compilers provide a
  171. compatibility mode such that code compiled under 4.0.x can be linked
  172. with other COFF format objects or libraries on a system running IRIX5.
  173. Each of the compiler products except for Ada have an irix4_ version
  174. of the product, for example the FORTRAN media comes with ftn and
  175. irix4_ftn products.  The current Ada release, 6.2.1, only produces
  176. COFF objects.  See the Known Bugs section of this document for a
  177. list of known problems with compiling in IRIX4 mode on IRIX 5.0.1.
  178. ^L
  179. * How to use and not use IRIX4 compatibility mode
  180.  
  181. In order to use the 'c' compiler in IRIX4 mode, the c *and* irix4_c
  182. products need to be installed (located on the IDO cd).  The /usr/bin/cc
  183. driver invokes the compiler stages with the correct paths when the
  184. environment variable SGI_IRIX4 is set.
  185.  
  186. Correct usage of IRIX4 compatibility mode:
  187. % setenv SGI_IRIX4 1
  188. % /usr/bin/cc hello.c -v
  189. /usr/irix4/usr/lib/acpp ...
  190. % file a.out
  191. a.out:          MIPSEB COFF executable (paged) not stripped - version 3.12
  192. % unsetenv SGI_IRIX4
  193. % /usr/bin/cc hello.c -v
  194. /usr/lib/cfe ...
  195. % file a.out
  196. a.out:   ELF 32-bit MSB dynamic executable (not stripped) MIPS - version 1
  197.  
  198. If /usr/irix4/usr/bin/cc is invoked instead of /usr/bin/cc, say if
  199. /usr/irix4/usr/bin is in the PATH before /usr/bin (it is not suggested to put
  200. /usr/irix4/usr/bin in the PATH), then a slightly misleading error message will
  201. be displayed.
  202.  
  203. Incorrect usage of IRIX4 compatibility mode:
  204. % /usr/irix4/usr/bin/cc hello.c
  205. cc: Error: ANSI C is not installed. (could not find /usr/lib/accom)
  206.  
  207. The same notions apply to FORTRAN and f77 (requires ftn *and* irix4_ftn;
  208. setenv SGI_IRIX4 1; and use the /usr/bin/f77 driver).
  209.  
  210.  
  211. * Installing system header files that are not a part of dev
  212.  
  213. To use the system header files (eg, /usr/irix4/usr/include/sys/types.h),
  214. the irix4_eoe1.sw.unix subsystem needs to be installed (located on the
  215. IRIX5 CD).  When compiling code in IRIX4 mode that #includes these system
  216. files, the compiler won't be able to find the headers if irix4_eoe1.sw.unix
  217. is not installed and errors will arise.  Trying to mix modes in using the
  218. IRIX5 /usr/include/sys headers (by possibly putting "-I/usr/include" on
  219. the compile line in IRIX4 mode) is the wrong thing to do and will cause
  220. something like this error message:
  221.  
  222. accom: Error: /usr/include/sgidefs.h, line 113: Incomplete external data
  223. declaration (missing storage class) or function definition missing () before
  224. {function body}
  225.        ERROR -- the macro "_MIPS_SZINT" is unset (currently, must be set to 32)
  226.        -------^
  227. accom: Error: /usr/include/sgidefs.h, line 113: syntax error
  228.        ERROR -- the macro "_MIPS_SZINT" is unset (currently, must be set to 32)
  229.        -------^
  230. ^L
  231. * What OS release will we stop shipping IRIX4 products?
  232.  
  233. The IRIX4 products are shipped to help customers during the transition
  234. to IRIX 5.1.  It is yet to be determined in which future release the IRIX4
  235. compatibility mode will be yanked.  5.2?  6.0?
  236.  
  237.  
  238. * What is not supported in IRIX4 compatibility mode?
  239.  
  240. The IRIX4 environment is strictly a "link and run" environment.  It was not 
  241. designed to extend into capabilities for debugging and performance tuning.  
  242. Therefore, only the compiler front ends (ie, cc and f77, but not yacc, prof,
  243. pixie, and lint) were modified to recognize the SGI_IRIX4 environment variable. 
  244. Additionally, it is not guaranteed that the COFF executables that are 
  245. created with the IRIX4 compatibility mode will work on other systems whether 
  246. they have IRIX4 installed or not.  The IRIX4 compatibility mode is intended 
  247. to get the needed application to run on that IRIX5 system. 
  248.  
  249.  
  250. * What are the versions of products, including IRIX4 products, for IRIX5?
  251.  
  252.      Is in 5.0.1 Release                      Is in 5.1 Release
  253. -------------------------------         -------------------------------
  254. Media Label     Versions output         Media Label     Versions output
  255. -----------     ---------------         -------------   ---------------
  256. On 5.0.1 IDO:                           On 5.1 IDO:
  257.   5.0.1 dev     5.0.1  dev                 5.1   dev    5.1    dev
  258.   irix4_dev     3.10.1 irix4_dev           irix4_dev    3.10.1 irix4_dev
  259.   3.16  c       3.16   c                   3.17  c      3.17   c
  260.   irix4_c       3.10.1 irix4_c             irix4_c      3.10.1 irix4_c
  261. 3.1.1 C++       3.1.1 c++               3.2 C++         3.2   c++
  262.   irix4_c++     3.0.1 irix4_c++            irix4_c++    3.0.1 irix4_c++
  263. 3.6.1 FORTRAN   3.16  ftn               4.0 FORTRAN     4.0   ftn
  264.   irix4_ftn     3.5.1 irix4_ftn            irix4_ftn    3.5.1 irix4_ftn
  265. 1.4.1 Pascal    3.16  pas               1.4.2 Pascal    1.4.2 pas
  266.   irix4_pas     1.3.1 irix4_pas            irix4_pas    1.3.1 irix4_pas
  267. 2.3 Power C     2.3   pwrc              2.4 Power C     2.4   pwrc
  268.   irix4_pwrc    2.1.1 irix4_pwrc           irix4_pwrc   2.1.1 irix4_pwrc
  269. 3.3 ^ Fortran   3.3   pfa               4.0 ^ Fortran   4.0   pfa
  270.   irix4_pfa     3.1.1 irix4_pfa            irix4_pfa    3.1.1 irix4_pfa
  271.  
  272.  
  273.  
  274. ------------------------------------------------------
  275. Known Bugs:
  276. ------------------------------------------------------
  277.  
  278. * irix4_ftn
  279.  
  280. Bug #159709:
  281. Using IRIX4 compatibility mode on MR-ed IRIX 5.0.1, the compiler driver
  282. attempts to link in -lftn instead of -lF77 -lU77 -lI77 -lisam.  The result
  283. is that when using "setenv SGI_IRIX4 1; /usr/bin/f77 file.f", FORTRAN code
  284. will not link.  The workaround is to invoke ld manually with the correct
  285. libraries.  This bug applies only to 5.0.1 since the fix is in 5.1.
  286. ^L
  287. -----------------------------------------
  288. * irix4_c++
  289.  
  290. Bug #168556:
  291. Background information-
  292. 3.0.1 c++ produces COFF object format.  3.0.1 c++ is compatible with
  293. 4.1.1 dev on IRIX 4.0.5.  There is an irix4_c++ product that comes with
  294. 3.1.1 c++ for IRIX 5.0.1.  That version of irix4_c++ is the 3.0.1 version.
  295. ELF and COFF objects cannot be mixed.  To use all ELF, ie the 3.1.1 c++,
  296. "/usr/bin/CC file.c".  To use all COFF, ie the 3.0.1 irix4_c++, this is
  297. suppose to work: "setenv SGI_IRIX4 1; /usr/bin/CC file.c".
  298.  
  299. Problem-
  300. When using IRIX4 compatibility mode on IRIX 5.0.1, the CC driver tries to
  301. link in an ELF object with the newly compiled COFF objects.  If the IRIX4
  302. compatibility mode is really needed, then workaround the problem by
  303. issuing the setenv SGI_IRIX4 command, compile using -c, and then link by
  304. using the IRIX4 driver:
  305.    setenv SGI_IRIX4 1; CC -c try.c; /usr/irix4/usr/bin/CC try.o
  306.  
  307. There is no problem with the driver if producing ELF, just recompile
  308. all sources and libraries with /usr/bin/CC (don't setenv SGI_IRIX4).
  309. This is fixed in IRIX 5.1.
  310.  
  311. -----------------------------------------
  312. * irix4_c
  313.  
  314. Bug #168471:
  315. When cc is used with the -E option and SGI_IRIX4 env var, then the driver
  316. tries to invoke /usr/irix4/usr/lib/cfe instead of /usr/irix4/usr/lib/acpp.
  317.  
  318. With IRIX 5.0.1 and the 3.16 c compiler:
  319. % setenv SGI_IRIX4 1
  320. % cc -E -v try.c
  321. /usr/irix4/usr/lib/cfe -D__EXTENSIONS__ -DLANGUAGE_C -D_LANGUAGE_C
  322. -D__INLINE_INTRINSICS -Dsgi -DSVR3 -D__SVR3 -D__sgi -Dunix -Dmips -Dhost_mips
  323. -D__unix -D__host_mips -D__DSO__ -DSYSTYPE_SYSV -D_SYSTYPE_SYSV -D_LONGLONG
  324. -D__mips=1 -I -D_MIPSEB -DMIPSEB -I/usr/irix4/usr/include try.c -E
  325. -D_LANGUAGE_C-D_CFE -D__unix -D__host_mips -D__DSO__ -std
  326. cc: Error: can't find or exec: /usr/irix4/usr/lib/cfe
  327.   : No such file or directory
  328.  
  329. A workaround for IRIX 5.0.1 and the 3.16 compiler is to use the
  330. /usr/irix4/usr/bin/cc driver instead of /usr/bin/cc and SGI_IRIX4 when
  331. using the -E option.  In doing so the driver invokes /usr/lib/acpp instead
  332. of /usr/irix4/usr/lib/acpp, but that does not appear to be a problem.
  333. This is fixed in IRIX 5.1.
  334. ^L
  335. -----------------------------------------
  336. * irix4_gl_x_dev
  337.  
  338. Bug #163598:
  339. Installing irix4_gl_x_dev on an IP19 (Challenge, Onyx) or IP22 (Indigo2)
  340. or IP?? (Indy) does not install /usr/irix4/usr/lib/libgl_s.a or libgl.a
  341. for the irix4_gl_x_dev that comes with 5.0.1 IDO.
  342.  
  343. Typically when this happens it is because the maint cd was not applied as a
  344. final step.  In the case of IRIX 5.0.1 there is no maint cd and no
  345. maint_irix4_gl_x_dev product.
  346.  
  347. The libgl_s.a and libgl.a libraries are the same for Crimson (IP17) with
  348. RealityEngine graphics as on Onyx or Challenge with RealityEngine graphics,
  349. so the following commands will install the missing files as a workaround.
  350. This bug is fixed in the irix4_gl_x_dev of 5.1 IDO for IRIX 5.1.
  351.  
  352. % /bin/su
  353. # mkdir /irix4_gl
  354. # inst -r /irix4_gl -m CPUBOARD=IP17 -m GFXBOARD=VENICE -m SUBGR=IP17
  355. -f /CDROM/dist/irix4_gl_x_dev
  356. # cp /irix4_gl/usr/lib/libgl* /usr/irix4/usr/lib
  357. # versions -r /irix4_gl remove irix4_gl_x_dev
  358. # rm -rf /irix4_gl
  359.  
  360. -----------------------------------------
  361. * irix4_pca
  362.  
  363. Bug #168939:
  364. When using the -pca option to cc in IRIX4 compatibility mode on IRIX
  365. 5.0.1, the cc driver omits the libmpc.a (-lmpc) library on the link line.
  366. This is fixed in IRIX 5.1.
  367.  
  368. % setenv SGI_IRIX4 1
  369. % cc -pca -v try.c
  370. ...
  371. /usr/irix4/usr/bin/ld -L -L/usr/irix4/usr/lib/ -G 8 -g0 -nocount
  372. /usr/irix4/usr/lib/crt1.o -count try.o -nocount -lc_mp -lkapio -lc
  373. /usr/irix4/usr/lib/crtn.o
  374. ld:
  375. Error: Undefined:
  376. usconfig
  377. usinit
  378. _lfopen
  379. _lfwrite
  380. _lfread
  381. _lfseek
  382. _lfclose
  383.  
  384. The workaround is to explicity link in -lmpc.  For example:
  385. % setenv SGI_IRIX4 1
  386. % cc -pca try.c -lmpc
  387. %
  388. ^L
  389. -----------------------------------------
  390. * irix4_pfa
  391.  
  392. Bug #168941:
  393. When using the -pfa option to f77 in IRIX4 compatibility mode on IRIX
  394. 5.0.1, the f77 driver passes to the pfa stage illegal options (options
  395. suitable for the IRIX 5.0.1 version of pfa).
  396.  
  397. % setenv SGI_IRIX4 1
  398. % f77 -pfa -v try.f
  399. ...
  400. /usr/irix4/usr/lib/pfa -L=/usr/tmp/ctmka001BUl1 -F=/usr/tmp/ctmka001BUm1
  401. -I=/usr/tmp/ctmpa001BU -lo=lno -noanalysis -original_filename=try.f
  402. -include=/usr/include -cp=i
  403.  Command line error -- unrecognizable string: "noanalysis"
  404.  PFA -- Command Line Syntax Error Detected
  405.  
  406. The problem is that the IRIX4 version of pfa does not understand either
  407. of -noanalysis or -original_filename options.  The IRIX4 version of
  408. the -original_filename flag is -customer.  The workaround is to invoke
  409. pfa manually with the correct options.  This is fixed in IRIX 5.1.
  410.  
  411. -----------------------------------------
  412. * ada 6.2.1 (on 5.0.x == IRIX4 mode)
  413.  
  414. Bug #159228:
  415. Background info:
  416. AXM 6.2.1 (Ada with X and Motif bindings) installed on 5.0.1 machines
  417. generates COFF objects and therefore tries to link in libraries under
  418. /usr/irix4/usr/lib.
  419.  
  420. The problem:
  421. The install script, which gets executed as an exit operation to the inst
  422. process, sets the wrong path for the X libraries.  As a result, the ada
  423. pre-linker attempts to find the libraries in /usr/lib (the incompatible
  424. ELF object file format versions) instead of /usr/irix4/usr/lib.
  425.  
  426. The Workaround:
  427. /bin/su
  428. cd /usr/vads
  429. vi sup/a.install.axi.sgi
  430.    change line 49 to
  431.       XLIB_LOCATION="/usr/irix4/usr/lib"
  432.    from
  433.       XLIB_LOCATION="/usr/lib"
  434. sup/a.install.sgi .
  435.  
  436. This is fixed in AXM 6.2.3 and higher.
  437. ^L
  438. ------------------------------------------------------
  439. More IRIX4 tidbits
  440. ------------------------------------------------------
  441.  
  442. A few more notes about using the IRIX4 compatibility build environment:
  443.  
  444.    o If there are undefined symbols, and the linking worked
  445.      on 4.0.x, add -nostdlib -L/usr/irix4/usr/lib or
  446.      -nostdlib -L/usr/irix4/usr/lib -L/usr/irix4/usr/lib/mips2
  447.      to the cc or f77 command line.
  448.  
  449.    o If the compilation is -mp, add -lI77_mp -lmpc at the end of
  450.      the command line to avoid multiply defined warnings from ld.
  451.  
  452.    o If you are linking Fortran objects and the -lX11 or -lX11_s
  453.      library, then link in -lmpc before -lgl or -lgl_s to avoid
  454.      warnings about multiply defined symbols between libmpc.a and
  455.      libX11.a (or libX11_s.a).
  456.  
  457.    o The -v2 switch is removed in the 3.1 c++ compiler that is
  458.      shipped with IRIX 5.0.  The effect of this is that those
  459.      applications that do not compile under c++ 3.x will not have
  460.      the ability to use 2.x C++ compatibility mode.  The -v2 switch
  461.      option is not available in IRIX4 compatibility mode either
  462.      since it is the 3.x driver that is invoked which no longer
  463.      recognizes -v2.
  464.  
  465. ------------------------------------------------------
  466. See Also:
  467. ------------------------------------------------------
  468. 5.0.1 or 5.1 IRIX relnotes if installed ("grelnotes IRIX")
  469.  
  470.  
  471.  
  472. There is one area that Dave Frederick didn't mention explicitly, but
  473. is implicit in every new release: undocumented "features" aren't
  474. guarenteed to remain. The trouble is, these are so arbitrary that
  475. you generally don't find them until your code breaks.
  476.  
  477. The only such case I know of is fsync. In Irix 4 and several other
  478. vendor's products, fsync also syncs directories, although this isn't
  479. obvious from the documentation. This stopped working in Irix 5.0.
  480.  
  481. Why do you sync a directory? To make sure that file attributes are
  482. synced along with file contents in a database. Simply fsyncing a file
  483. would not necessarily update its attributes.
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490. # 3.  Is it reasonable to expect that if __STDC__ is 
  491.       defined to be long double it will be supported?
  492. ------------------------------------------------------------
  493. Newsgroups: sgi.engr.devp
  494. Subject: Re: Long doubles and __STDC__
  495. Organization: Silicon Graphics, Inc.  Mountain View, CA
  496. Date: Thu, 23 Sep 1993 04:26:36 GMT
  497.  
  498. >A developer is curious about support for long doubles.  They are
  499. >expecting that if __STDC__ is defined that the compiler
  500. >should support long double.  Since they are compiling -xansi __STDC__ is
  501. >defined and they get warnings when they try use long double.
  502. >
  503. >I look in float.h and it has comment which reads:
  504. >
  505. >/*
  506. > * Note: For now, all constants that refer to long doubles (LDBL) are
  507. > * filled in with values for DBL.
  508. > */
  509. >
  510. >This is on 5.1 MR.  Bottom line is, I think, the compilers convert long
  511. >double to double with a warning.   Is it reasonable for the developer
  512. >to expect that if __STDC__ is defined that long double will be supported?
  513.  
  514. The problem here is the developer does not understand the ANSI Standard.
  515.  
  516. (I don't have the Std here at home. I'm taking 'long double' as
  517. actually being in the C std on faith.)
  518.  
  519. By turning 'long double' into 'plain double' and compiling and running
  520. as such, 
  521.     This is what the C standard requires.
  522.  
  523. Nowhere in the standard is IEEE arithmetic nor a 64-bit long double
  524. mandated.
  525.  
  526. There is only one sense in which long double must be different from
  527. double:
  528.     double *x
  529.     long double *y
  530. must not be treated the same even though we represent thm
  531. the same in released compilers.
  532.  
  533. >>     That's not a problem, I'm using doubles on the Sun.  But it does
  534. >> raise an interesting question: why is SGI defining __STDC__ if it is
  535. >> *not* supporting long doubles?  Here is the relevant code:
  536. >> 
  537. >> #ifdef __STDC__
  538.  
  539. Again: there is no lack of conformance here.  There is
  540. a user misunderstanding of a particular point.
  541.  
  542. If this is not enough I can quote the standard sections tomorrow...
  543. Or H&S or K&R if that is what the developer has to look at...
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550. # 4.  'mkshlib' command:  trying to create a shared library
  551. ------------------------------------------------------------
  552. Newsgroups: comp.sys.sgi.apps
  553. From: davea@quasar.mti.sgi.com (David B.Anderson)
  554. Subject: Re: mkshlib
  555. Organization: Silicon Graphics, Inc.  Mountain View, CA
  556. Date: Thu, 23 Sep 1993 03:34:58 GMT
  557.  
  558. In article <27psug$fm0@monet.ccad.uiowa.edu> morrison@ccad.uiowa.edu (Michael Morrison) writes:
  559. >Does anyone have any further info on the 'mkshlib' command?  I am trying
  560. >to create a shared library, and having numerous difficulties.
  561. >
  562. >Specifically, what are the REAL command options?  E.g: '#objects noload'
  563. >is not documented in the man-page.  The errors produced are difficult
  564. >to understand, such as:
  565. [some stuff deleted]
  566.  
  567.   '#objects noload' is not documented since it's not supported.
  568.  
  569. >This is under 4.0.5F, as well as older versions.
  570.  
  571. >Sorry if this is documented somewhere and I just can't find it.
  572.  
  573. Well, producing static shared libraries is very difficult.
  574.  
  575. The end result of the difficult process of creating one is
  576. a library type which is obsolete as of SVR4 and IRIX5.
  577. Any existing libraries continue to *work* I hasten to add.
  578. But they are replaced by dynamic shared objects, and
  579. dynamic shared objects (dso-s) are easy to build and use.
  580.  
  581. Of course I cannot promise when IRIX5 will be available to you.
  582. But I'd suggest you simply use plain archive files till it is.
  583.  
  584. SUMMARY: give up in static shared libraries, please!
  585. (If you really MUST have them (like your thesis depends on it :-) send
  586. me email.)
  587.  
  588. BTW: if your library source  is in C, a static shared library is
  589. possible. IF it is Ada, C++, or Fortran you had better give up now
  590. :-)   (Well we managed (sort of) with C++ but the result is not easy to
  591. live with.)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. # 5.  where did logname() go in 5.1 Irix?
  599. ------------------------------------------------------------
  600. Newsgroups: sgi.engr.devp
  601. Subject: Re: what happened to logname() ?
  602. Organization: Silicon Graphics, Inc.  Mountain View, CA
  603. Date: Thu, 23 Sep 1993 17:41:21 GMT
  604.  
  605. > >  Likely sccs was the only SGI product using the library [libPW]
  606. > In Irix 4, libPW contained regex() and regcmp().  These commonly
  607. > used functions have apparently migrated to some other library in Irix 5.
  608. These appear to have landed in libadm.a on IRIX 5.1.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615. # 6.  why does fflush call itself so often?
  616. ------------------------------------------------------------
  617. Newsgroups: sgi.engr.all
  618. Subject: Re: Why does fflush call itself so often
  619. Organization: Silicon Graphics, Inc.  Mountain View, CA
  620. Date: Fri, 24 Sep 1993 10:11:18 GMT
  621.  
  622. |> |> And here is a list of functions along with the number of times they were called.
  623. |> |>        101    fflush
  624. |> |>         98    _lseek
  625. |> |>
  626. |> |> 100 of the calls to fflush were recursive. One was from _cleanup.
  627. |> 
  628. |> Because _cleanup calls fflush(0), which as the man page documents:
  629. |> 
  630. |>      fflush causes any unwritten buffered data for the named stream to be
  631. |>      written to that file.  The stream remains open.  If the value of stream
  632. |>      is NULL, all streams associated with the process are flushed.
  633. |> 
  634. |> Then fflush(0) simply calls itself with a non-NULL arg for each
  635. |> stdio stream that might exist.
  636. |> 
  637. |> The real question to my mind is why did all the fflush calls
  638. |> cause an _lseek, which is a real system call, and would seem
  639. |> unnecessary to me, on file descriptors that stdio has never
  640. |> worked with in that process.
  641.  
  642. The stupid lseeks and extra fflushs was fixed late in 5.1
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649. # 7.  when will I see 64 bits?
  650. ------------------------------------------------------------
  651. From: stever@flatcat.engr.sgi.com (Steve Whitney)
  652. Newsgroups: comp.sys.sgi.misc
  653. Subject: Re: when will I see 64 bits
  654. Date: 23 Sep 1993 23:19:03 GMT
  655. Organization: Silicon Graphics, Inc., Mountain View, CA
  656. Lines: 19
  657.  
  658. In article <1993Sep22.163802.5519@research.nj.nec.com>,
  659. Henry Cejtin <henry@research.nj.nec.com> wrote:
  660. >It's been a long time now since MIPS started shipping the R4000, but even  on
  661. >IRIX  5.0.1  there seems to be no 64 bit support.  When will the OS allow one
  662. >to run user processes in 64-bit mode, and when will the compiler  generate
  663. >such code?
  664.  
  665. The version of Irix to be released on the POWER Challenge platform will i
  666. support 64-bit user processes.  It will also ship with compilers capable 
  667. of generating this code.
  668.  
  669. POWER Challenge is currently scheduled to ship with the TFP processor 
  670. some time in early 1994, though, as always, you should check with your 
  671. sales rep for official dates.  (I'm just an engineer!)
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678. # 8.  will SGI's C++ compiler include exception handling?
  679. ------------------------------------------------------------
  680. Newsgroups: comp.sys.sgi.apps
  681. From: pal@xanadu.wpd.sgi.com (Anil Pal)
  682. Subject: Re: REQUEST TO SGI C++ COMPILER DEVELOPERS 
  683. Organization: Silicon Graphics, Inc.
  684. Date: Thu, 30 Sep 1993 00:27:32 GMT
  685. Lines: 22
  686.  
  687. In article <CE4LHt.Ep@ssesco.com>, mitchv@ssesco.com (Mitch Voehl) writes:
  688. |> REQUEST TO SGI C++ COMPILER DEVELOPERS
  689. |> 
  690. |> I'm involved in porting an existing software package which contains
  691. |> exceptions, and require a compiler which implements them.  I've been
  692. |> told that the C++ compiler which SGI is writing will not include
  693. |> exceptions.
  694.  
  695. The first release of the compiler will not include exception handling
  696. (it will be source-code compatible with the langauge as of cfront
  697. 3.x).  Exception handling is definitely planned for a subsequent
  698. release of the compiler.
  699.  
  700. |> When will SGI have a C++ compiler which implements exceptions?  I
  701. |> need them now.
  702.  
  703. It's a bit early to talk about dates for future releases.
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710. # 9.  when were the C preprocessor symbols "sgi" & "_sgi" introduced?
  711. ------------------------------------------------------------
  712. Newsgroups: comp.sys.sgi.misc
  713. From: davea@quasar.mti.sgi.com (David B.Anderson)
  714. Subject: Re: sgi vs. __sgi history
  715. Organization: Silicon Graphics, Inc.  Mountain View, CA
  716. Date: Mon, 27 Sep 1993 23:47:02 GMT
  717.  
  718. In article <andras.749160057@concave> andras@concave.cs.wits.ac.za (Andras Salamon) writes:
  719. >
  720. >Does anybody know when the C compiler preprocessor symbols sgi and
  721. >__sgi were introduced?  Knowing which symbols are unique to which
  722. >version of IRIX would make it easier to contribute patches when porting
  723. >software to run on IRIX.
  724.  
  725. __sgi was introduced with ANSI C: sgi is a *user* symbol in strict 
  726. ANSI mode.    __sgi only tells you that this is not an 
  727. IRIX 3.3.? compiler release.
  728.  
  729. Even if you use
  730.     file
  731. on some binary the compiler version number *at best* works for
  732. irix4.  So far, IRIX5 binaries report only a 'version 1' (elf version,
  733. not compiler version) which is not what you are after.
  734.  
  735. But
  736.     file
  737. is probably your best bet:
  738. actual output:
  739.     file /usr/lib/accom
  740. /usr/lib/accom: mipseb demand paged stripped (R4000 fpdiv 
  741.    unchecked) - version 3.12
  742.                 ^^^^^^^^^^^^
  743. IRIX4.0.1                    version 2.10
  744. IRIX4.0.5 base compilers     version 2.40
  745. IRIX4.0.5 3.10 compilers     version 2.40 
  746. IRIX4.0.5 3.10.1  compilers  version 3.12
  747.  
  748. IRIX5   (any) 
  749. davea-166: file /usr/lib/cfe
  750. /usr/lib/cfe:   ELF 32-bit MSB dynamic executable MIPS - version 1
  751.  
  752. Maybe someone else will have a  better idea.
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759. #10.  getting "undefined" errors again with C++ linking
  760. ------------------------------------------------------------
  761. Newsgroups: comp.sys.sgi.misc
  762. From: pal@xanadu.wpd.sgi.com (Anil Pal)
  763. Subject: Re: HELP: C++ linking again
  764. Organization: Silicon Graphics, Inc.
  765. Date: Tue, 28 Sep 1993 01:04:57 GMT
  766. Lines: 34
  767.  
  768. In article <27q7u0$9tp@helga.setd-ctl.nawcad.navy.mil>, donn@helga.setd-ctl.nawcad.navy.mil (Donn Mielcarek) writes:
  769. |> 
  770. |> This is driving me crazy. What do I need to link? Here's the code:
  771. |> 
  772. |> #include <iostream.h>
  773. |> 
  774. |> main()
  775. |> {
  776. |>     cout << 'A' << endl;
  777. |> }
  778. |> 
  779. |> compiled with:
  780. |>     CC file.C -o file -lC -lc_s
  781. |> 
  782. |> compiler says:
  783. |> 
  784. |> /usr/bin/ld:
  785. |> Undefined:
  786. |> ostream::ls_complicated(char)
  787.  
  788. If this isn't in the FAQ by now, it should be.  The C++ library,
  789. libC.a, is part of the development option (IDO), since it is needed by
  790. some development libraries.  if you install a new version of C++ (e.g.
  791. C++ 3.0) without installing the required version of the IRIS
  792. Development Option (4.1, I believe), you will see problems like this.
  793.  
  794. Check the release notes for your version of C++ and see which version
  795. of the devlopment option it requires.
  796.  
  797. (which provides a new libC.a)
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804. #11.  FORTRAN Intrinsic Function Generic Name. Is the Manual Wrong?
  805. ------------------------------------------------------------
  806. Newsgroups: comp.sys.sgi.bugs,comp.sys.sgi.misc
  807. From: thefred@allegro.csd.sgi.com (David A. Frederick)
  808. Subject: Re: FORTRAN Intrinsic Function Generic Name. Is the Manual Wrong?
  809. Organization: Silicon Graphics, Inc.
  810. Date: Wed, 29 Sep 1993 08:12:09 GMT
  811. Lines: 110
  812.  
  813. In article <jchauvinCE3DvL.8Jv@netcom.com>, jchauvin@netcom.com (John H. Chauvin) writes:
  814. |> 
  815. |> I'm confused. According to the Fortran 77 Language
  816. |> Reference Manual, page A-5, the generic name for the
  817. |> intrinsics function  AMAX1 is MAX1. Is this right? Most
  818. |> books on Fortran 77 show MAX1 as a stand alone function
  819. |> which equates to  INT(MAX(r1,r2,...)). This same argument
  820. |> applies to the MIN1 function.  My understanding is that
  821. |> MAX should be the generic name  for MAX0, AMAX1, and
  822. |> DMAX1. MIN should be the generic name for MIN0, AMIN1,
  823. |> and DMIN1. Both MAX1 and MIN1 have no generic name.
  824. |> 
  825. |> Is the manual wrong? Am I wrong? What are the 
  826. |> generic names for:
  827. |> 
  828. |>           AMAX1?
  829. |>           AMIN1?
  830. |>           
  831. |> John Chauvin
  832. |> Northrop Advanced Technology and Design Center
  833. |> Pico Rivera, California 
  834. |> Email:jchauvin@netcom.com        
  835.  
  836. Well you appear to be partially correct.  The ANSI standard's table 
  837. (page 15-23) is different from the F77 LRM's table (and MAX(3F) manual 
  838. page) in that it is as you said.  It isn't clear that MAX1 and MIN1 
  839. have no generic name since Section 15 of Appendi x B says the following:
  840.  
  841.    For the specific functions that define the maximum and minimum values 
  842.    with a function type different from the argument type (AMAX0, MAX1, 
  843.    AMIN0, MIN1), it is recommeneded that an expression containing the 
  844.    generic name preceded by a type conversion function be used, for 
  845.    example, REAL(MAX(a1, a2, ...)) for AMAX0(a1, a2,...), so that these 
  846.    specific function names may be deleted in a future revision of this 
  847.    standard. 
  848.  
  849. This implies to me that MAX is the generic name for AMAX0.  At any rate, 
  850. it appears that it is just the manual and manual page that is incorrect 
  851. and not the software.  Enclosed is a sample program and dis -S -h output 
  852. for the relevant parts.
  853.  
  854. C File:     intr.f
  855. c Compile:  f77 -O0 intr.f
  856. c
  857.         intrinsic max1, max, amax1
  858.         real j,m,n
  859.         j=1.0
  860.         m=2.0
  861.         n = max(j,m)
  862.         type *, 'n is ', n
  863.  
  864.         n = max1(j,m)
  865.         type *, 'n is ', n
  866.  
  867.         n = amax1(j,m)
  868.         type *, 'n is ', n
  869.  
  870.         stop
  871.         end
  872.  
  873.  
  874. % dis -h -S a.out | more
  875. 5:      n = max(j,m)
  876.   [intrinsic2.f:   5] 0x4002c8: c7a8003c        lwc1    $f8,60(sp)
  877.   [intrinsic2.f:   5] 0x4002cc: c7aa0038        lwc1    $f10,56(sp)
  878.   [intrinsic2.f:   5] 0x4002d0: 00000000        nop
  879.   [intrinsic2.f:   5] 0x4002d4: 460a403c        c.lt.s  $f8,$f10
  880.   [intrinsic2.f:   5] 0x4002d8: 00000000        nop
  881.   [intrinsic2.f:   5] 0x4002dc: 45000002        bc1f    0x4002e8
  882.   [intrinsic2.f:   5] 0x4002e0: 00000000        nop
  883.   [intrinsic2.f:   5] 0x4002e4: 46005206        mov.s   $f8,$f10
  884.   [intrinsic2.f:   5] 0x4002e8: e7a80034        swc1    $f8,52(sp)
  885.  
  886. 8:      n = max1(j,m)
  887.   [intrinsic2.f:   8] 0x400334: c7b0003c        lwc1    $f16,60(sp)
  888.   [intrinsic2.f:   8] 0x400338: c7b20038        lwc1    $f18,56(sp)
  889.   [intrinsic2.f:   8] 0x40033c: 00000000        nop
  890.   [intrinsic2.f:   8] 0x400340: 4612803c        c.lt.s  $f16,$f18
  891.   [intrinsic2.f:   8] 0x400344: 00000000        nop
  892.   [intrinsic2.f:   8] 0x400348: 45000002        bc1f    0x400354
  893.   [intrinsic2.f:   8] 0x40034c: 00000000        nop
  894.   [intrinsic2.f:   8] 0x400350: 46009406        mov.s   $f16,$f18
  895.   [intrinsic2.f:   8] 0x400354: 444ef800        cfc1    r14,$31
  896.   [intrinsic2.f:   8] 0x400358: 00000000        nop
  897.   [intrinsic2.f:   8] 0x40035c: 35c10003        ori     r1,r14,0x3
  898.   [intrinsic2.f:   8] 0x400360: 38210002        xori    r1,r1,0x2
  899.   [intrinsic2.f:   8] 0x400364: 44c1f800        ctc1    r1,$31
  900.   [intrinsic2.f:   8] 0x400368: 00000000        nop
  901.   [intrinsic2.f:   8] 0x40036c: 46008124        cvt.w.s $f4,$f16
  902.   [intrinsic2.f:   8] 0x400370: 44cef800        ctc1    r14,$31
  903.   [intrinsic2.f:   8] 0x400374: 440f2000        mfc1    r15,$f4
  904.   [intrinsic2.f:   8] 0x400378: 00000000        nop
  905.   [intrinsic2.f:   8] 0x40037c: 448f3000        mtc1    r15,$f6
  906.   [intrinsic2.f:   8] 0x400380: 00000000        nop
  907.   [intrinsic2.f:   8] 0x400384: 468032a0        cvt.s.w $f10,$f6
  908.   [intrinsic2.f:   8] 0x400388: e7aa0034        swc1    $f10,52(sp)
  909.  
  910. 11:     n = amax1(j,m)
  911.   [intrinsic2.f:  11] 0x4003d4: c7a8003c        lwc1    $f8,60(sp)
  912.   [intrinsic2.f:  11] 0x4003d8: c7b20038        lwc1    $f18,56(sp)
  913.   [intrinsic2.f:  11] 0x4003dc: 00000000        nop
  914.   [intrinsic2.f:  11] 0x4003e0: 4612403c        c.lt.s  $f8,$f18
  915.   [intrinsic2.f:  11] 0x4003e4: 00000000        nop
  916.   [intrinsic2.f:  11] 0x4003e8: 45000002        bc1f    0x4003f4
  917.   [intrinsic2.f:  11] 0x4003ec: 00000000        nop
  918.   [intrinsic2.f:  11] 0x4003f0: 46009206        mov.s   $f8,$f18
  919.   [intrinsic2.f:  11] 0x4003f4: e7a80034        swc1    $f8,52(sp)
  920.  
  921.  
  922. The LRM's table says that MAX1 is the generic name for AMAX1, whereas the ANSI standard says that MAX is the generic name for AMAX1.  The above output seems to show that the compiler abides the standard.
  923.  
  924. I will file a documentation bug unless I missed something.
  925.  
  926.    
  927.  
  928.  
  929.  
  930.  
  931. #12.  Can one do Parallel processing without Power C?
  932. ------------------------------------------------------------
  933. Newsgroups: comp.sys.sgi
  934. From: gavin@krypton.asd.sgi.com (Gavin Bell)
  935. Subject: Re: Parallel processing without Power C?
  936. Date: 28 Sep 1993 05:44:56 GMT
  937. Organization: Silicon Graphics, Inc., Mountain View, CA
  938. Lines: 22
  939.  
  940. Timothy Cullip <cullip@clarkson.radonc.unc.edu> wrote:
  941. >If a person doesn't want to buy (or can't afford) Power C, are there any
  942. >options for using multiple processors within a single program on a 
  943. >multiprocessor SGI (like our four processor Onyx)?
  944. >
  945. >I could do (and we have done) some work using multiple processes that 
  946. >explicitly use shared memory, semaphores, and/or sockets, but it's clumsy.
  947.  
  948. I've used both raw sproc() and the m_fork() routines that come
  949. standard with IRIX with great success in the past.  I agree that the
  950. SYSV-style semaphores and shared memory are a royal pain-- I'd suggest
  951. you stay away from them and use the IRIX-specific stuff; see the
  952. usinit() and usnewsema() man pages, which aren't too hard to use.
  953. Also try the m_fork() and sproc() man pages (you'll probably use the
  954. PR_SALL argument to sproc to share memory and everything else between
  955. threads).
  956.  
  957. I haven't been impressed with Power C, but the applications I was
  958. parallelizing were much better suited to a higher-grained parallelism.
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965. #13.  What the IRIX 64bit implementation be of 
  966.       variable declarations for c and c++ ?
  967. ------------------------------------------------------------
  968. Newsgroups: sgi.engr.devp
  969. From: davea@quasar.mti.sgi.com (David B.Anderson)
  970. Subject: Re: IRIX 64bit question from Developer
  971. Organization: Silicon Graphics, Inc.  Mountain View, CA
  972. Date: Fri, 1 Oct 1993 21:13:32 GMT
  973.  
  974. >>> Subject: IRIX 64bit question from Developer
  975. >>>
  976. >>> developers are enthusiastically
  977. >>> awaiting their opportunity to port to 64bit
  978. >>> IRIX (they completed the painful DEC-alpha
  979. >>> port) and had a question I could not
  980. >>> answer.
  981. >>>
  982. >>> What is will be the IRIX 64bit implementation
  983. >>> of variable declaration for c and c++ ? Is
  984. >>> there any sort of summary or short report
  985. >>> on this that I could access?
  986.  
  987. In the sgi 64-bit model (applies to 64-bit programs, not
  988. to 32-bit programs even if the 32-bit program is running on
  989. 64-bit-capable OS):
  990.  
  991.   8-bit:   char, unsigned char, signed char
  992.  
  993.   16-bit:  [signed] short, unsigned short
  994.  
  995.   32-bit:  [signed] int, unsigned int
  996.        float
  997.  
  998.   64-bit:  [signed] long, unsigned long
  999.        all pointers
  1000.        double
  1001.  
  1002.   128-bit: long double
  1003.  
  1004. malloc space aligned to 16-byte boundaries (ie multiple of 16, for
  1005. long double).  Stack alignment of the stack pointer required to
  1006. be 16-byte boundary.
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013. #14.  variable length arglist problem
  1014. ------------------------------------------------------------
  1015. Newsgroups: comp.sys.sgi.misc
  1016. From: pj@sam.wpd.sgi.com (Paul Jackson)
  1017. Subject: Re: variable length arglist problem
  1018. Date: 1 Oct 1993 04:44:21 GMT
  1019. Organization: Silicon Graphics, Research & Development
  1020. Lines: 23
  1021.  
  1022. In article <28fes2$rkb@reznor.larc.nasa.gov>, smith@icat.larc.nasa.gov (Steven L. Smith) writes:
  1023. |> Why is the routine findmaxf not working properly in the code below?
  1024. |> #include <stdarg.h>
  1025. |> 
  1026. |> float findmaxf(float n1,...)
  1027. |> {
  1028. |>   va_list  argp;        /* Argument pointer. */
  1029. |> 
  1030. |>   va_start(argp,n1);
  1031.  
  1032. To quote the stdarg man page:
  1033.  
  1034.      void va_start (va_list ap, ParmN);
  1035.  
  1036.      The ANSI C Standard (ANSI X3.159-1989) restricts the type of parmN to one
  1037.      of the types resulting from the default argument promotions, currently
  1038.      int, unsigned int, pointer, or double.
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045. #15.  SGI's policy re:  the Delta C++ compiler?
  1046. ------------------------------------------------------------
  1047. Newsgroups: comp.sys.sgi.misc
  1048. From: pal@xanadu.wpd.sgi.com (Anil Pal)
  1049. Subject: Re: SGI's C++ Policy
  1050. Organization: Silicon Graphics, Inc.
  1051. Date: Sat, 2 Oct 1993 00:27:23 GMT
  1052. Lines: 40
  1053.  
  1054. In article <1993Oct1.103550.9135@infodev.cam.ac.uk>, tfw10@cus.cam.ac.uk (T.F. Wiegand) writes:
  1055. |> Can anyone from SGI comment on their policy with regards to C++ ?
  1056. |> 
  1057. |> Is this new "native" compiler intended to replace SGI's current cfront based
  1058. |> C++ offering? If I bought WorkShop Pro C++ would I need the standard C++
  1059. |> product and WorkShop as well ? Will development of the cfront based product
  1060. |> continue or is this a cynical ploy to make existing C++ users pay again to
  1061. |> get continued language updates :-).
  1062.  
  1063. OK, I'll try to provide some more info.  This is *not* the final word,
  1064. and not the official position, but just my understanding of the current
  1065. state of affairs:
  1066.  
  1067. 1. The initial release of WorkShop Pro C++ will initially be the only
  1068.    way to get your hands on the Delta/C++ compiler.
  1069.  
  1070. 2. The Delta/C++ compiler will eventually be broken out and delivered
  1071.    stand alone, without the smart build facility.
  1072.  
  1073. 3. This compiler will be made available on a future release of IRIX.
  1074.  
  1075. 4. The cfront-based translator will continue to be available for some time.
  1076.    Current guess is at least one year, maybe more.
  1077.  
  1078. 5. During the overlap period, C++ libraries will be delivered in both cfront
  1079.    and Delta form.
  1080.  
  1081. 6. Note that the new compiler can be used in non-Delta mode, and will generate
  1082.    cfront-compatible .o's
  1083.  
  1084. 7. SGI effort for new feature additions (e.g. exceptions) will be
  1085.    directed at the new compiler, for obvious reasons.
  1086.  
  1087. 8. Upgrade policy for existing cfront customers beyond the lifetime of the
  1088.    old translator hasn't been finalised, but I would guess we will be
  1089.    reasonable on this one.
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096. #16.  Usinit et al. disturbs real-time-ness
  1097. ------------------------------------------------------------
  1098. Newsgroups: comp.sys.sgi.misc
  1099. From: jwag@moose.wpd.sgi.com (Chris Wagner)
  1100. Subject: Re: Usinit et al. disturbs real-time-ness
  1101. Date: 4 Oct 1993 17:57:36 GMT
  1102. Organization: Silicon Graphics, Research & Development
  1103. Lines: 48
  1104.  
  1105. In article <1993Oct3.092623.11239@fys.ruu.nl>, muts@fys.ruu.nl (Peter Mutsaers) writes:
  1106. |> 
  1107. |> we use some real-time processes, with non-degrading priorities
  1108. |> and locked memory. However, when disk activity occurs the process
  1109. |> may get delays as high as 20 milliseconds, which is fatal to the
  1110. |> application.
  1111. |> 
  1112. |> This only happens when usinit etc. (shared arenas) are used.
  1113. |> 
  1114. |> SGI in the Netherlands has not been able to help us yet.
  1115. |> 
  1116. |> Could this be a bug in the shared arenas? Or is it normal, since mmap()
  1117. |> underlies them. My theory was that mmap() mirrors the new (locked) 
  1118. |> address space provided by it also in the filesystem buffer.
  1119. |> Now, when another process fills the filesystem buffer, such updates may
  1120. |> not fit anymore in physical memory and the real-time process much wait
  1121. |> for disk access to complete. Could this be a cause?
  1122.  
  1123. usinit arenas by default us AUTOGROW mapped files - when you call usmalloc
  1124. (or some other us* call that must malloc memory) and the arena needs to grow
  1125. if the underlying file isn't large enough it will be grown automatically -
  1126. this of course causes disk activity.
  1127.  
  1128. If you are not mallocing, and not paging, then there shouldn't be
  1129. any reason for the dirty mmaped pages to be returned to disk. By
  1130. default, unless you call msync or close the mapped file, pages of
  1131. mapped file you write through your address space are not put
  1132. in the 'buffer; cache.
  1133.  
  1134. As a first test - after calling usinit, make sure the file is a large size
  1135.  
  1136. I assume you are running on 4.X?? not 5.X - under 5.X you can specify
  1137. that the arena file not be autogrow - at usinig time it will be
  1138. grown to the size you request.
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145. #17.  how do i call a C++ member function from within dbx?
  1146. ------------------------------------------------------------
  1147. Newsgroups: comp.sys.sgi
  1148. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1149. Subject: Re: dbx & c++
  1150. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1151. Date: Thu, 7 Oct 1993 18:29:56 GMT
  1152.  
  1153. In article <CEHH6K.LtA@da_vinci.it.uswc.uswest.com> rdorgan@newsit.mtt.it.uswc.uswest.com (Robert Dorgan) writes:
  1154.  
  1155. >One thing I havent been able to figure out is how to call a
  1156. >member function from within dbx. ccall doesnt seem to handle
  1157. >stuff like "ccall this->func()".
  1158.  
  1159. Describing both IRIX4 and IRIX5:
  1160.  
  1161.     ccall  class::func(this)
  1162.  
  1163. might work better.  Note you have to supply the implicit argument
  1164. yourself (that's why it's called ccall: it is not language sensitive
  1165. and pretends all called functions are C).  And you must know the right
  1166. class (there is no attempt to access a virtual function table in
  1167. finding the function address).
  1168.  
  1169. print   class::func(this)
  1170. works the same (same restrictions)
  1171.  
  1172. And because there is no specifying WHICH of a group of overloaded
  1173. functions is to be called, you will wind up getting them ALL called in
  1174. some order.  But for some the arguments are surely wrong. 
  1175. And if they have different numbers of arguments or the arguments
  1176. fail a type-matching operation ,dbx will object and
  1177. stop dealing with the command.
  1178.  
  1179. In other words, c++ interactive calls work for simple cases.  But not
  1180. as nicely as you might wish.
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187. #18.  Why does ld add -lX11_s when it sees -lgl_s ?
  1188. ------------------------------------------------------------
  1189. Newsgroups: comp.sys.sgi.graphics
  1190. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1191. Subject: Re: Why does ld add -lX11_s when it sees -lgl_s ???
  1192. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1193. Date: Tue, 12 Oct 1993 20:34:15 GMT
  1194.  
  1195. In article <1993Oct12.175514.24470@news.uiowa.edu> williams@herky.cs.uiowa.edu (Kent Williams) writes:
  1196. >I built the X11R5 libraries under SGI Irix 4.0.5 .  Then I compiled my
  1197. >application with them, and linked with libgl_s.a.  But cc insists on
  1198. >linking libX11_s.a even if I don't specify it.  If you type
  1199. >
  1200. >cc -v junk.o -lgl_s
  1201. >
  1202. >The output is
  1203. >
  1204. >/usr/bin/ld -G 8 -g0 -nocount /usr/lib/crt1.o -count junk.o -lgl_s -lX11_s \
  1205. >                                      what the hell is this? -------^^^^^^
  1206. >-nocount -lc_s -lc /usr/lib/crtn.o 
  1207. >
  1208. >I have to use the shared gl library if I want to support more than one
  1209. >kind of Iris graphics hardware.
  1210. >
  1211. >This causes icky problems if you want to use R5 libraries since ld will report
  1212. >lots and lots of multiply defined symbols between X11.a and X11_s.a. I don't
  1213. >know if the program still works.
  1214.  
  1215. gl_s REQUIRES libX11_s to work.  If you  (or the compiler) don't put
  1216. -lX11_s on the ld line, x11_s is *still* used at run time thru some
  1217. kernel magic.
  1218.  
  1219. It was the magic factor that lead us to have the -lgl_s cause -lX11_s
  1220. to be added by the cc/f77/pc driver.  (I changed the cc/f77/pc driver
  1221. to do this before 4.0.1 was released.) The result is that X11_s shows
  1222. up in odump -L output and it makes the use of X11_s not seem like
  1223. magic.  In addition, -lc_s is added automatically when you use -lgl_s.
  1224. Similar reasons.
  1225.  
  1226. If you link with
  1227.     /usr/lib/libgl_s.a
  1228. rather than
  1229.     -lgl_s
  1230. on the command line
  1231. you will not see -lX11_s on the command line and the linker won't
  1232. object.  And odump -L won't show libX11_s.
  1233.  
  1234. If you link this way with your own X11R5 I have no idea whether the 
  1235. result will work or which X11 you will actually be using at run time.
  1236.  
  1237.  
  1238. Newsgroups: comp.sys.sgi.graphics
  1239. From: olson@anchor.esd.sgi.com (Dave Olson)
  1240. Subject: Re: Why does ld add -lX11_s when it sees -lgl_s ???
  1241. Organization:  Silicon Graphics, Inc.  Mountain View, CA
  1242. Date: Wed, 13 Oct 93 00:20:56 GMT
  1243. Lines: 12
  1244.  
  1245. In <l0tmhrg@sgi.sgi.com> davea@quasar.mti.sgi.com (David B.Anderson) writes:
  1246. | gl_s REQUIRES libX11_s to work.  If you  (or the compiler) don't put
  1247. | -lX11_s on the ld line, x11_s is *still* used at run time thru some
  1248. | kernel magic.
  1249.  
  1250. The latter was done to allow 3.3 binaries to run, since libX11_s didn't
  1251. exist in 3.3, by the way.
  1252.  
  1253.  
  1254.  
  1255. Newsgroups: comp.sys.sgi.graphics
  1256. From: mjk@hoot.asd.sgi.com (Mark Kilgard)
  1257. Subject: Re: Why does ld add -lX11_s when it sees -lgl_s ???
  1258. Date: 13 Oct 1993 02:45:53 GMT
  1259. Organization: Silicon Graphics, Inc.
  1260. Lines: 79
  1261.  
  1262. In article <1993Oct12.175514.24470@news.uiowa.edu>, williams@herky.cs.uiowa.edu (Kent Williams) writes:
  1263. |> I built the X11R5 libraries under SGI Irix 4.0.5 .  Then I compiled my
  1264. |> application with them, and linked with libgl_s.a.  But cc insists on
  1265. |> linking libX11_s.a even if I don't specify it.  If you type
  1266. |> 
  1267. |> cc -v junk.o -lgl_s
  1268. |> 
  1269. |> The output is
  1270. |> 
  1271. |> /usr/bin/ld -G 8 -g0 -nocount /usr/lib/crt1.o -count junk.o -lgl_s -lX11_s \
  1272. |>                                       what the hell is this? -------^^^^^^
  1273.  
  1274. It is the X11R4 static shared Xlib library.  The IRIS GL automatically
  1275. links with it in IRIX 4.0.x.  Before 4.0.x, IRIS GL programs simply linked
  1276. with the IRIS GL library.  With the advent of using X as the native
  1277. window system, the IRIS GL interoperates with X behind the scenes.  To
  1278. avoid breaking Makefile's and so old programs would work, linking with
  1279. -lgl_s automatically pulls in the X11R4 Xlib static shared library.
  1280.  
  1281. |> -nocount -lc_s -lc /usr/lib/crtn.o 
  1282. |> 
  1283. |> I have to use the shared gl library if I want to support more than one
  1284. |> kind of Iris graphics hardware.
  1285.  
  1286. Yes.
  1287.  
  1288. |> This causes icky problems if you want to use R5 libraries since ld will report
  1289. |> lots and lots of multiply defined symbols between X11.a and X11_s.a. I don't
  1290. |> know if the program still works.
  1291. |> 
  1292. |> Here are some of the error messages:
  1293. |> 
  1294. |> Warning: _XFlush: multiply defined
  1295. |>         previous (used) definition from '/usr/local/X11R5/lib/libX11.a';
  1296. |>         new (ignored) definition from '/usr/lib/libX11_s.a'
  1297. |> Warning: _XIOError: multiply defined
  1298. |>         previous (used) definition from '/usr/local/X11R5/lib/libX11.a';
  1299. |>         new (ignored) definition from '/usr/lib/libX11_s.a'
  1300. |> Warning: _XEventsQueued: multiply defined
  1301. |>         previous (used) definition from '/usr/local/X11R5/lib/libX11.a';
  1302. |>         new (ignored) definition from '/usr/lib/libX11_s.a'
  1303. |> 
  1304. |> etc, etc ...
  1305.  
  1306. Yes, what you are doing is not supported.  Mixing the IRIS GL library with
  1307. another version of Xlib is not supported.  You will definitely have problems
  1308. and it won't work.
  1309.  
  1310. |> But if I capture the ld command, and take out -lX11_s, then I get a bunch
  1311. |> of undefined externals like this:
  1312. |> 
  1313. |> _libX_errno
  1314. |> _libX___XErrorFunction
  1315. |> _libX___XIOErrorFunction
  1316. |> _libX___Xdebug
  1317. |> _libX___XHeadOfDisplayList
  1318. |> _libX__qfree
  1319. |> _libX__ctype
  1320. |> _libX_sleep
  1321. |> _libX__filbuf
  1322. |> _libX__flsbuf
  1323. |> _libX__iob
  1324. |> _libX__semgetc
  1325. |> _libX__semputc
  1326. |> _libX__us_rsthread_stdio
  1327.  
  1328. Yes, this has to do with how the libX11_s static shared library is constructed.
  1329.  
  1330. If you want to use X11R5, I suggest you ask about upgrading to IRIX 5.1 or
  1331. later.  It includes X11R5.
  1332.  
  1333. If you program is a simply IRIS GL programming (no mixed-model programming
  1334. or X connections on the side), you should not need to link with an X11R5
  1335. library.  Perhaps you can explain why you want to link with X11R5 Xlib
  1336.  and IRIS GL.
  1337.  
  1338. The X11R5 library you built should work just fine for pure X clients.
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345. #19.  lex question re: yywrap()
  1346. ------------------------------------------------------------
  1347. Newsgroups: sgi.engr.devp
  1348. Subject: Re: lex question
  1349. Date: 13 Oct 1993 00:42:34 GMT
  1350. Organization: Silicon Graphics, Inc., Mountain View, CA
  1351. Lines: 21
  1352.  
  1353. >There's a developer who's priority is having a clean ABI-compliant 
  1354. >product.  They're linking with libl (lex) and apparently only using 
  1355. >the function 'yywrap'.  Now that doesn't seem to make a whole lot of 
  1356. >sense to me, since according to the lex man page, it's called at 
  1357. >end-of-file, and "indicates whether normal wrapup should continue".
  1358.  
  1359. The version of yywrap() in libl really doesn't do a whole lot; in fact,
  1360. the entire definition is  
  1361.  
  1362.     int yywrap() { return 1; }
  1363.  
  1364. If you don't want to link with libl, you can just include the above
  1365. definition yourself.  
  1366.  
  1367. As for the intent, yywrap() allows you to hook the analyzer's actions when 
  1368. it finishes processing a file; in this way, a user could potentially open
  1369. another file and continue tokenizing if desired.
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376. #20.  R4000 and R4200 and instruction caching
  1377. ------------------------------------------------------------
  1378. Newsgroups: sgi.engr.all
  1379. Subject: Re: R4000 and R4200 question
  1380. Date: 13 Oct 1993 15:50:01 GMT
  1381. Organization: Silicon Graphics, Inc.
  1382. Lines: 40
  1383.  
  1384. |> Lets say I have two instructions:
  1385. |> 
  1386. |>     lw    t0,N(t1)
  1387. |>     lw    t2,M(t3)
  1388. |>     nop
  1389. |> 
  1390. |> And lets say that the first instruction data fetch misses the primary
  1391. |> cache. Does the second instruction immediately, or does it wait until
  1392. |> the primary cache is filled? If it does execute, and M(t3) is in the
  1393. |> primary cache, will the nop execute before the first instruction
  1394. |> completes the primary cache fill, or after?
  1395.  
  1396. The r4400 and r4200 are both single issue machines with blocking
  1397. caches and they issue instructions in program order and retire instructions
  1398. in program order. So the second load will have to wait for the cache miss
  1399. caused by the first load to complete (the pipeline is stalled). No
  1400. instructions will complete until the cache miss caused by the first load
  1401. is finished.
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408. #21.  is there a way to link COFF & ELF objects together under 5.1?
  1409. ------------------------------------------------------------
  1410. Newsgroups: comp.sys.sgi.misc
  1411. From: asgeir@viking.asd.sgi.com (Asgeir Eiriksson)
  1412. Subject: Re: coff/elf
  1413. Organization:  Silicon Graphics, Inc.  Mountain View, CA
  1414. Date: Thu, 7 Oct 93 23:07:06 GMT
  1415. Lines: 22
  1416.  
  1417. In <1993Oct7.033503.3951@raster.mn.org> jhm@raster.mn.org (Jeff Michaud) writes:
  1418.  
  1419. >Is there some way to link COFF and ELF objects together under IRIX 5.1?
  1420. >Is there a way to convert between the two formats?  I looked and rtfm'd
  1421. >but couldn't come up with anything.
  1422.  
  1423. >From the IRIX release notes for 5.0 (/usr/sbin/grelnotes):
  1424.  
  1425.        ..... The IRIX 5.0 compilation tools do not support
  1426.        linking objects built in an IRIX 4 environment (COFF format)
  1427.        with objects built in an IRIX 5 environment (ELF).  It is
  1428.        not possible to link .o or .a files, unless they are all
  1429.        compiled with IRIX 5.0 tools or are all compiled with IRIX
  1430.        4.0.x or the IRIX 4 compatibility tools.
  1431.  
  1432.  
  1433.  
  1434. From: mccauley@phaeton.wpd.sgi.com (Jay McCauley)
  1435. Subject: Re: coff/elf
  1436. Organization: Silicon Graphics, Inc.
  1437. Date: Fri, 8 Oct 1993 16:32:41 GMT
  1438. Lines: 42
  1439.  
  1440. Another post cites the Release Notes (thanks, Asgeir) which are correct,
  1441. this is not permitted.  Let me comment, briefly, on why, as it might
  1442. seem arbitrary on our part.
  1443.  
  1444. ELF vs ECOFF is more than just the format of the object modules in
  1445. IRIX 5.x.  We use the fact that something is in ELF form to trigger
  1446. the use of the SVR4 interfaces which include the use of Expanded 
  1447. Fundemental Types (EFT).  EFT changes the size of a number of
  1448. system-defined types, and introduces new typedef's for others
  1449. while making the underlying thingy bigger.  For example the new
  1450. uid_t is a 32 bit quantity, bidding fond farewell to the
  1451. last vestages of the PDP-11 native integer size.  These type
  1452. changes also change the shape of "popular" structures.  An ECOFF
  1453. object would have embedded in its code assumptions about these
  1454. offsets which would be incorrect if an SVR4 style structure was
  1455. used.  If you are lucky the resulting program would crash, if you
  1456. are unlucky, it silently gets the wrong answers.
  1457.  
  1458. So, even if you monkeyed around with the object files with some new
  1459. tool transforming ECOFF into ELF, the result would almost undoubtedly
  1460. not work as you would want it to.
  1461.  
  1462. IRIX 5.x does include a collection of libraries and include files
  1463. that permit IRIX 4.x developed libraries and *.o files to be continue
  1464. to be used.
  1465.  
  1466.  
  1467.  
  1468.  
  1469. #22.  using "-D__STDC__=1":  struct sigcontext not included in compilation
  1470. ------------------------------------------------------------
  1471. Newsgroups: comp.sys.sgi.bugs,comp.sys.sgi.misc
  1472. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1473. Subject: Re: HELP!!  struct sigcontext not being included in compilation!!
  1474. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1475. Date: Sat, 9 Oct 1993 14:51:36 GMT
  1476. Lines: 33
  1477.  
  1478. In article <1993Oct8.201026.9755@llyene.jpl.nasa.gov> robert@triton.Jpl.Nasa.Gov writes:
  1479. >BACKGROUND:
  1480. >    IRIX 4.0.5F, indigo xs24.  Using the following to compile:
  1481. >cc -I../inc -I. -DNO_PROTO -g -ansi -prototypes -float  -c resource_main.c
  1482. >
  1483. >I have this program which uses signals.  I have three function
  1484. >prototypes which are the signal handlers.  I keep getting errors
  1485. >from the compiler telling  me that sigcontext isn't defined anywhere 
  1486.  
  1487. The cc(1) man page tries to make clear that the preferred (that is,
  1488. normal) compilation command is
  1489.     cc -xansi -D__STDC__=1
  1490. and that
  1491.     cc -ansi 
  1492. is really only for compiler conformance testing.
  1493.  
  1494. More than a few people have not understood this so the man page is
  1495. obviously not as clear as I had hoped!
  1496.  
  1497. My reasoning in setting it up this way was wrong, both in terms
  1498. of normal expectations and the ANSI/ISO standard.  Sorry.
  1499.  
  1500. This is fixed in IRIX5: there __STDC__ is 1 with -xansi, -ansi,
  1501. and -ansiposix automatically.  With -cckr __STDC__ is absent.
  1502.  
  1503. Summary: With IRIX4, use cc -xansi -D__STDC__=1  NOT -ansi
  1504.          With IRIX5, use cc -xansi               NOT -ansi
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511. #23.  getting "illegal member use" ?
  1512. ------------------------------------------------------------
  1513. Newsgroups: comp.sys.sgi.misc
  1514. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1515. Subject: Re: "illegal member use" ?!?
  1516. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1517. Date: Sat, 9 Oct 1993 15:16:39 GMT
  1518. Lines: 40
  1519.  
  1520. In article <292apf$28i@korfu.igd.fhg.de> reiners@igd.fhg.de writes:
  1521. >
  1522. >I'm getting "illegal member use"'s lately, which I don't understand.
  1523. >
  1524. >They keep appearing when I add new members to a struct, but they complain
  1525. >about an old member of the struct, and only of one, all the others work perfectly.
  1526. >
  1527. >What's the meaning of this message anyway, when does it appear and how can I get
  1528.  
  1529. >A strange fact is the difference between machines. 
  1530. > When compiling with Ansi C 1.1 under 4.0.5C I get different messages 
  1531. >from the ones with Ansi C 1.1 under 4.0.5H. Not only different 
  1532. >messages, but also in different structures.
  1533.  
  1534. >P.S.: I'm using cckr-mode.
  1535.  
  1536. Try using
  1537.     cc -E -Wp,-showdefines
  1538. on the two machines and comparing the output.
  1539. (-showdefines is documented on the cpp and acpp man pages)
  1540.  
  1541. If the two machines have different gl hardware they may have different
  1542. gl header files even at the same release level.  
  1543. Is it possible your structure elements conflict
  1544. with something in a header?
  1545.  
  1546. Does the spelling of the added member matter?
  1547.  
  1548. If the spelling is crucial and -showdefines demonstrates that
  1549. the member name does NOT conflict with any #define, it is
  1550. probable that you are encountering an old and annoying bug in
  1551. /usr/lib/ccom.   If you are able to switch to -xansi -D__STDC__=1
  1552. you will not have this problem (I claim :-).
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559. #24.  trouble accessing /debug/nnnnn files via ioctl()
  1560. ------------------------------------------------------------
  1561. Newsgroups: comp.sys.sgi.apps
  1562. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1563. Subject: Re: accessing /debug/nnnnn files via ioctl()
  1564. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1565. Date: Thu, 14 Oct 1993 01:50:10 GMT
  1566. Lines: 17
  1567.  
  1568. In article <1993Oct13.164434.23917@den.mmc.com> totah@argon.den.mmc.com (Philip E. Totah) writes:
  1569. >I was trying to access the files in /debug to obtain the prpsinfo struct.
  1570. >I've included the source code, the error output and system information.
  1571.  
  1572. re: ioctl(fd, PIOCPSINFO, &prpsinfo)
  1573.  
  1574. Your program works fine in IRIX5. 
  1575. It does not work in IRIX4. Sorry.
  1576. One way to get the process name given a process id is to do:
  1577.     
  1578.     proc_name is an array of char....
  1579.  
  1580.     syssgi(SGI_RDNAME,pid,proc_name, sizeof(proc_name)-2);
  1581.     proc_name[sizeof(proc_name)-1] = 0; /* just in case
  1582.         name was as long as buffer: I want a null terminator */
  1583.  
  1584. See
  1585.     man syssgi
  1586. for more info
  1587.     
  1588. This works fine in IRIX4 and IRIX5 (this is what dbx does to
  1589. implement the dbx -P flag).
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596. #25.  Lisp still failing with ""contiguous jump problem" in 5.1
  1597. ------------------------------------------------------------
  1598. Date: Thu, 14 Oct 1993 13:11:33 -0800 (PDT)
  1599. Cc: engr.all@esd.sgi.com, devp@esd.sgi.com
  1600.  
  1601. > Our IRIX 5.1 Lisp image (running via the IRIX4 compatibility package)
  1602. > is continuing to fail in some very mysterious ways on our Indigo.
  1603. > Our most pressing need at the moment is to get an explanation for a
  1604. > particular message that appears on the console window coincident with
  1605. > the Lisp process receiving an "illegal instruction" signal (upon encountering
  1606. > what appears to be a perfectly legal instruction).
  1607. > The message text is:
  1608. > WARNING: For R4000, too many contiguous jump problems in [new-lisp-no-reorg] pid=19907
  1609. > Could you possibly make an inquiry and find a detailed description of
  1610. > the circumstances triggering this message?  (Or a pointer to existing
  1611. > documentation - we have tried and failed to find any references...)
  1612. The "contiguous jump problem" still occurs in 5.1 sometimes but the
  1613. compiler group has reduced the frequency of it.  It has something to 
  1614. do with a jump at the end of a page to another jump at the end of a
  1615. page.  SInce the LISP people are probably generating their own code
  1616. on the fly they probably wouldn't now to avoid this.  On 5.1 there is
  1617. a compiler option flag to force jumps to always jump to double word
  1618. aligned targets.  I think this prevents jumps to the last address
  1619. in the page by always jumping to the next to last word in a page instead.
  1620.  
  1621. Bottomline its another bug in the R4000 and another reason why SGI wants to
  1622. abandon the R4000 in favor of the R4400.
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629. #26.  can't find ELF object file access library
  1630. ------------------------------------------------------------
  1631. Newsgroups: sgi.engr.all
  1632. Subject: Re: ELF libraries
  1633. Date: 14 Oct 1993 22:20:12 GMT
  1634. Organization: Silicon Graphics, Inc.
  1635. Lines: 22
  1636.  
  1637. |> customer question: do we have an ELF library where customers
  1638. |> can call functions to get at pieces of an ELF file? like the symbol
  1639. |> table, etc.?
  1640. |> 
  1641. |> Customer claims this is 'standard' part of SVR4.
  1642.  
  1643. You need to use /usr/lib/libelf.a . The external interface 
  1644. to the functions in libelf.a is in /usr/include/libelf.h . 
  1645.  
  1646.  
  1647.  
  1648. Newsgroups: sgi.engr.all
  1649. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1650. Subject: Re: ELF libraries
  1651. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1652. Date: Thu, 14 Oct 1993 23:20:19 GMT
  1653.  
  1654. /usr/lib/libelf.a
  1655. is in the release.
  1656.  
  1657. The SVR4 AT&T UNIX SYSTEM V RELEASE 4 Programmer's Reference Manual
  1658. (pub. Prentice Hall) has a section 3E which documents all the elf
  1659. calls.  That's the documentation we currently use.
  1660.  
  1661. There is, I am told, a bug report on this oversight already.
  1662. I will see it gets some attention.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669. #27.  strange messages from linker 
  1670.       (vt_Atom_vts: both a large and small symbol)
  1671. ------------------------------------------------------------
  1672. Newsgroups: comp.sys.sgi.misc
  1673. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1674. Subject: Re: Strange messages from linker
  1675. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1676. Date: Fri, 15 Oct 1993 18:57:12 GMT
  1677.  
  1678. In article <29fbj7$l6q@rag.austin.nam.slb.com> dboles@slcs.slb.com ( David Boles) writes:
  1679. >I am getting (I believe from the linker) messages of the form:
  1680. >
  1681. >vt_Atom_vts: both a large and small symbol (possible gp relocation errors ma
  1682. >-y result)
  1683.  
  1684. This suggests that the equivalent of the following is present:
  1685.  
  1686. char vt_Atom_vts[20];       /* in one source file */
  1687. extern char vt_Atom_vts[2]; /* in another source file */
  1688.  
  1689. This is a no-no.  Don't lie to the compiler about the sizes of things.
  1690. An alternative is to compile your code -G 0. This gives up a
  1691. very small amount of performance but will eliminate the warnings.
  1692.  
  1693.  
  1694. >Warning: gp relocation out-of-range in .text section for relocation entry 1
  1695. >-for symbol: BooleanFF_vts
  1696.  
  1697. This could be something similar.
  1698.  
  1699. These warnings are serious: the resulting a.out will not work.
  1700.  
  1701. Add -yvt_Atom_vts  -yBooleanFF_vts
  1702. on the link line to see what object files reference these
  1703. symbols.
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710. #28.  what is the current version for CC?
  1711. ------------------------------------------------------------
  1712. Newsgroups: comp.sys.sgi.apps
  1713. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1714. Subject: Re: SGI C++ versions
  1715. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1716. Date: Tue, 19 Oct 1993 20:08:11 GMT
  1717. Lines: 23
  1718.  
  1719. In article <1993Oct19.141038.12646@news.cs.indiana.edu> "peter shirley" <shirley@cs.indiana.edu> writes:
  1720. >We (finally) got our SGI Varsity Pack software, which included
  1721. >SGI CC version 3.0.1 (as reported by versions-- see below.  Not to 
  1722. >be confused with cfront 3.?.?).  I think
  1723. >this is a rather old version.  Does anyone know
  1724. >how old?  What is the current version?
  1725.  
  1726. >output of versions
  1727. >I  c++                  10/18/93  C++, 3.0.1
  1728.  
  1729. This is the cfront that goes with 3.10.1 compilers. It is
  1730. the latest release for IRIX4.
  1731.  
  1732. 3.0.1 is our product numbering: it is not NOT the numbering
  1733. ATT/USL/Novell assign to cfront.  The similarity to ATT
  1734. cfront numbering is confusing, I admit...
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741. #29.  Format of pixie(1) trace files?
  1742. ------------------------------------------------------------
  1743. Newsgroups: comp.arch,comp.sys.dec,comp.sys.mips,comp.sys.sgi.misc
  1744. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1745. Subject: Re: Format of pixie(1) trace files?
  1746. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1747. Date: Mon, 18 Oct 1993 21:31:41 GMT
  1748.  
  1749. In article <29ukp8INNn9j@ymir.cs.umass.edu> salehi@.cs.umass.edu () writes:
  1750. >I'm using pixie(1) to generate execution-time instruction 
  1751. >and data memory reference traces (available with the -idtrace flag).  
  1752. >
  1753. >Does anyone know the format of the trace file pixie generates? 
  1754. >Is this info off in a MIPS compiler manual? 
  1755. >
  1756. >The man page doesn't mention the trace file format. There is a cryptic
  1757. >-[no]oldtrace option which refers to the "old memory reference trace
  1758. >format", but the format is not specified.  
  1759. >Jim Salehi                                  Department of Computer Science
  1760. >salehi@cs.umass.edu                         Amherst, MA 01003
  1761.  
  1762. The best source I know of is:
  1763.  
  1764. Tracing With Pixie
  1765. Michael D. Smith
  1766. Tech Report  CSL-TR-91-497
  1767. Stanford University Computer Systems Laboratory
  1768.  
  1769. To get it contact:
  1770.                                 Naomi Schulman
  1771.                           COMPUTER SYSTEMS LABORATORY
  1772.                               Stanford University
  1773.                             Stanford, CA 94305-4055
  1774.                      E-mail: schulman@sierra.stanford.edu
  1775.                                  415-723-1430
  1776.                             Hours: M-Th, 8-2 (PST)
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783. #30.  is there an already-compiled version of gcc for the SGI r4k?
  1784. ------------------------------------------------------------
  1785. Newsgroups: comp.sys.sgi.apps
  1786. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1787. Subject: Re: gcc
  1788. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1789. Date: Wed, 20 Oct 1993 17:56:14 GMT
  1790.  
  1791. In article <jehofmei.751080807@vela.acs.oakland.edu> jehofmei@vela.acs.oakland.edu (James Hofmeister) writes:
  1792. >DOes anybody know where I can get an already-compiled version of gcc
  1793. >for the SGI r4k?  I do not have a C-compiler, so I cannot compile any
  1794. >source code.  This was a problem when NFS arrived from SUN as source
  1795. >code, and although I was able to get a compiled version of that, it
  1796. >would be nice to have a compiler.
  1797.  
  1798. gcc won't do you much good. You don't have enough headers, libraries,
  1799. or object tools without the develoment option (ido). 
  1800. ido includes the C compiler.
  1801.  
  1802. You need to purchase ido to have a useful compilation environment.
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809. #31.  gp problem:  overflowing the "small-data" area
  1810. ------------------------------------------------------------
  1811. Newsgroups: sgi.engr.all
  1812. Subject: customer with gp problem
  1813. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1814. Date: Thu, 21 Oct 1993 17:26:11 GMT
  1815.  
  1816.  > Can anyone assist with this developer's problem?  The company has an
  1817.  > innovative 3-D mechanical CAD package that I've been encouraging them to
  1818.  > port to SGI, and they've run into what looks like a bad snag.
  1819.  
  1820. What has happened is that you have overflowed the "small-data" area,
  1821. which is limited to 64K of data, which can be accessed with a
  1822. shorter code sequence than is otherwise possible.  The error
  1823. "gp-relocation out of range" means that code was generated for a data
  1824. item in anticipation of its being able to be place in the small data
  1825. region, but it did not in fact fit, hence the generated code has no
  1826. hope of working.
  1827.  
  1828. What to do? Reduce the number of items which the compiler is trying to
  1829. place in the small data area.  How to accomplish this?
  1830.  
  1831. Recompile stuff with the flag -G 0.  What is this -G number anyway?
  1832. At compile time, it specifies a data-item size.  Data items of that
  1833. size or smaller (in bytes) will have code generated for them to be
  1834. placed in the "small-data" area.  Data items which are larger will
  1835. have code generated which will work regardless of placement.
  1836.  
  1837. Thus recompilation of source with -G 0 will prevent *any* data items
  1838. from being generated that way.  But sometimes that isn't enough.  You
  1839. might also have to install and link against the G0 versions of system
  1840. archives.
  1841.  
  1842.  > 1) Made sure we were using the latest compiler.  We are using version
  1843.  > 3.10 of the compilers and loader on IRIX 4.0.5.
  1844.  
  1845. Actually the latest available on 4.0.5 is 3.10.1, but I don't think it
  1846. should matter for this problem.
  1847.  
  1848.  > 2) Linked our CAD program which also uses the ACIS kernel and a
  1849.  > mixture of C and C++.  The CAD program executable also is a slightly
  1850.  > larger than the solid server.  It links and runs fine which leads me
  1851.  > to believe it is not a size limitation.
  1852.  
  1853. Not strictly a size issue, anyway.  See above.
  1854.  
  1855.  > 3) Striped most of the code out of the solid server and linked it with
  1856.  > minimal calls into ACIS and Hoops.  This version linked and runs
  1857.  > fine.  As I slowly add routines back in the loader problem shows up
  1858.  > again.  I then removed the routines where the problem started and
  1859.  > added some other routines and the problem still occurs so it does not
  1860.  > seem to be asscociated with the addition of specific code.
  1861.  
  1862. No, it is associated with the accumulation of too much "small data"
  1863. By the way, you can find out how much "small data" is associated with
  1864. a particular object file thus:
  1865.  
  1866. % odump -h filename
  1867.  
  1868. the sections marked .sdata, .lit4, .lit8, and .sbss are associated
  1869. with small data.  odump -h should report the sizes.
  1870.  
  1871.  > 4) I tried linking with -G values of 0, 4, 8 and 10 with no success.
  1872.  > The output of each is shown below.  I recompiled all .c and .cxx
  1873.  > routines with each "-G" change.
  1874.  
  1875. Unfortunately, the linker can't do much based on its -G value other
  1876. than figure out where to put commons.  What is needed is a
  1877. recompilation.
  1878.  
  1879.  > 5) I have generated verbose loader output and loader maps with nothing
  1880.  > showing up as obviously wrong.  With the verbose output there are alot
  1881.  > of warnings about system routines which show a compiler version of
  1882.  > 2.40.  The load map shows all sections are smaller than the CAD
  1883.  > executable that links fine.
  1884.  
  1885. The warnings about 2.40 may be safely ignored.
  1886.  > The various loader errors for -G values are as follows:
  1887.  > 
  1888.  > ****************************************************************************
  1889.  > 
  1890.  > Errors with -G8:
  1891.  > 
  1892.  > GP (null)
  1893.  > gp relocation out-of-range for small data or bss by,
  1894.  >            2885 in the positive direction,
  1895.  >               0 in the negative direction.
  1896. It looks like you haven't overflowed by much so perhaps recompiling -G 4 
  1897. will fix this particular problem
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904. #32.  accessing int, short, char bitfield and alignment issues
  1905. ------------------------------------------------------------
  1906. Newsgroups: comp.sys.sgi.misc
  1907. From: "David B.Anderson" <davea@quasar.mti.sgi.com>
  1908. Subject: Re:  int, short, char bitfields
  1909. Date: Sat, 23 Oct 1993 15:38:21 GMT
  1910. Lines: 75
  1911.  
  1912.  
  1913. DanKarron (karron@nyu.edu) writes:
  1914. >>I am trying to template some binary data and
  1915. >>does it matter if I use a
  1916.  
  1917. >>unsigned short  a : 4;
  1918. >>unsigned short  b : 24;
  1919.         b:24 is wrong: a short won't hold 24 bits.
  1920.  
  1921. >>or
  1922.  
  1923. >>unsigned int a: 4;
  1924. >>unsigned int b: 24;
  1925.  
  1926. Yes it matters with our compilers (ANSI C only defines
  1927. the meaning of the int/unsigned int forms: the short/char
  1928. bit fields are a common extension).
  1929.  
  1930. >>What about alignment issues between ints's and short's ?
  1931.  
  1932. Try the following:
  1933.  
  1934. struct x {
  1935.     char a;
  1936.     unsigned short b:4;
  1937.     long c;
  1938.     char d;
  1939.     unsigned int e:24;
  1940.     char f;
  1941.  
  1942.  
  1943. } y;
  1944.  
  1945. void dump(char *cp,int len)
  1946. {
  1947.     int i = 0;
  1948.     for( ; len > 0; --len,++cp,++i) {
  1949.         if(i > 0 && (i%4) == 0)
  1950.             printf(" ");
  1951.         printf("%02x",*cp);
  1952.     }
  1953.     printf("\n");
  1954. }
  1955. #define Offsetof(z) ((long) &(z) - (long)(&y))
  1956. int main()
  1957. {
  1958.     printf("offset a %d\n",Offsetof(y.a));
  1959.     printf("offset c %d\n",Offsetof(y.c));
  1960.     printf("offset d %d\n",Offsetof(y.d));
  1961.     printf("offset f %d\n",Offsetof(y.f));
  1962.     y.b = -1;
  1963.     y.f = -1;
  1964.     dump((char *)&y,sizeof(y));
  1965.     return 0;
  1966. }
  1967.  
  1968. Note that b shares the first 16-bits with a. And that e is
  1969. aligned after 3 unused pad bytes.
  1970.  
  1971. In other words, bit fields obey their 'type'.
  1972.  
  1973. Again, this is our practise: code relying on this sort of thing
  1974. is non-portable.
  1975.  
  1976. If you want to access strangely-aligned data you will find it
  1977. easier (and more portable) to use masking and shifting
  1978. to access the data.  IMO.
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986. #33.  assembly question:  version stamp
  1987. ------------------------------------------------------------
  1988. Newsgroups: comp.sys.sgi
  1989. From: davea@quasar.mti.sgi.com (David B.Anderson)
  1990. Subject: Re: assembly question
  1991. Organization: Silicon Graphics, Inc.  Mountain View, CA
  1992. Date: Fri, 22 Oct 1993 23:13:58 GMT
  1993.  
  1994. In article <CF9yzJ.IFF@NeoSoft.com> thuy@blkbox.COM (Thuy Mai) writes:
  1995. >I have a 3 lines assembly program that I try to understand:
  1996. >
  1997. >.verstamp 1 0
  1998. >.glob g00_
  1999. >g00_ = 0x7000000
  2000. >
  2001. >
  2002. >Let assume the above program saved as "g00.s", I try to compile it
  2003. >and the result as followings:
  2004. >
  2005. >as -c g00.s
  2006. >    as0: Warning: g00.s, line 2: version stamp does not match
  2007. >    .verstamp 1 0
  2008.  
  2009. Do cc -S on a hello world program. Look at the .verstamp created.
  2010. Change your assembly code to match.
  2011.  
  2012. The .verstamp just indicates what compiler release is involved.
  2013. IRIX 4.0.5 compilers may have a .verstamp with any of
  2014.     2 40    (This one is the base 2.20/2.40 compilers)
  2015.     3 10    (this one is the 3.10 compilers stamp)
  2016.     3 12    (this one is 3.10.1, the latest for IRIX4)
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023. #34.  how can I access/interpret the stack from within a program?
  2024. ------------------------------------------------------------
  2025. Newsgroups: sgi.engr.devp
  2026. Subject: Re: accessing stack from app
  2027. Organization: Silicon Graphics, Inc.  Mountain View, CA
  2028. Date: Tue, 28 Sep 1993 21:14:01 GMT
  2029.  
  2030. On Sep 28,  6:13pm, Kathy Simpson wrote:
  2031. > Subject: accessing stack from app
  2032. >
  2033. > Meaning the ability to dump a textual stack
  2034. > trace from an application program.
  2035.  
  2036.  
  2037.     One way is to use the abort() system call.
  2038.     This will produce a core dump (which has stack trace)
  2039.     but it will also exit the program.
  2040.  
  2041.     If you want the program to continue executing, then
  2042.     you can do this, which is what a number of debug malloc
  2043.     libraries do, to make a core file and continue.
  2044.  
  2045.         /*
  2046.          * fork so child can abort (and dump core)
  2047.          */
  2048.         if( (pid = fork()) == 0 )
  2049.         {
  2050.              VOIDCAST write(2,"Child dumping core\n",
  2051.                                            (unsigned)19);
  2052.              VOIDCAST signal(SIGIOT, SIG_DFL);
  2053.              VOIDCAST abort();
  2054.         }
  2055.  
  2056.         /*
  2057.          * wait for child to finish dumping core
  2058.          */
  2059.          while( wait((int *)0) != pid)
  2060.          {
  2061.          }
  2062.  
  2063.  
  2064.  
  2065. Newsgroups: sgi.engr.devp
  2066. From: olson@anchor (Dave Olson)
  2067. Subject: Re: accessing stack from app
  2068. Organization:  Silicon Graphics, Inc.  Mountain View, CA
  2069. Date: Tue, 28 Sep 93 23:23:30 GMT
  2070. Lines: 26
  2071.  
  2072. | We currently have need of functionality available on other platforms.
  2073. | Have seen other platforms's source that allow applications access to 
  2074. | the stack.  Meaning the ability to dump a textual stack trace from an 
  2075. | application program.
  2076.  
  2077. Dave Anderson had a package that allows this under 40x; not supported
  2078. but it does work.  
  2079.  
  2080. This same implementation works under 5.1--see the two programs in
  2081. the ~4Dgifts/toolbox/src/swtools/tracebackCode directory.
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088. #35.  ELF/COFF 4.0.5X compatibility library for 5.1.1?
  2089. ------------------------------------------------------------
  2090. Newsgroups: comp.sys.sgi.misc
  2091. From: knobi@knobi.munich.sgi.com (Martin Knoblauch)
  2092. Subject: Re: ELF/COFF 4.0.5X compatibility library for 5.1.1??
  2093. Date: 25 Oct 1993 15:14:17 GMT
  2094. Organization: Silicon Graphics, Inc.
  2095. Lines: 26
  2096.  
  2097. In article <2a9taq$rb7@darkstar.UCSC.EDU>, paul@aztec.cse.ucsc.edu (Paul
  2098. Tatarsky) writes:
  2099. |> How are people on the net dealing with the compiler output format
  2100. |> change from COFF to ELF under IRIX 5.1 when they still have 4.0.5X
  2101. |> machines sharing the source code areas?
  2102. |> 
  2103. |> Or is their something I have missed that lets you generate COFF format
  2104. |> files under 5.1.1?
  2105.  
  2106.   People can install the irix4 compatibility stuff that comes
  2107. for free with IRIX-5.x.y.z (eoe, dev, dev, ftn, c++, etc.). They
  2108. than can 'setenv SGI_IRIX4 1' (or the equivalent in your favourite
  2109. shell). After that all the compiler related commands use the latest
  2110. IRIX-4 compiler tools (3.10.1/3.12).
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117. #36.  times when necessary to use the -static flag when compiling with f77
  2118. ------------------------------------------------------------
  2119. Newsgroups: comp.sys.sgi.bugs,comp.sys.sgi.misc
  2120. Subject: Re: fortran compiler bug?
  2121. From: davea@quasar.mti.sgi.com (David B.Anderson)
  2122. Organization: Silicon Graphics, Inc.  Mountain View, CA
  2123. Date: Mon, 25 Oct 1993 20:50:02 GMT
  2124.  
  2125. In article <mitch.751578732@groucho> mitch@unidata.ucar.edu (Mitch Baltuch) writes:
  2126. >
  2127. >we have an application that is running fine on sun workstations, but fails
  2128. >on sgi indigo's.  we have traced the failure to a piece of fortran code that
  2129. >has been around since 1980 (usgs map projection stuff).  the problem seems to
  2130. >be that an area of memory is getting overwritten, munging some parameters
  2131. >that are used in projection calculations, causing erroneous results.
  2132.  
  2133. If you did not use -static, as in
  2134.     f77 -static
  2135. on the compile line, please do so.
  2136.  
  2137. See the f77  man page on -static.
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144. #37.  what's the difference the abi and irix libs?
  2145. ------------------------------------------------------------
  2146. Re: dev.sw.abi vs eoe1.sw.svr4net versions of lib{socket,nsl}.so??
  2147. FYI.  More on the difference between abi and irix libs from the gods. 
  2148.  
  2149. >> What's the difference between the dev.sw.abi and eoe1.sw.svr4net
  2150. >> versions of libsocket.so and libnsl.so?  It looks like they're built
  2151. >> from the same source but w/slightly different librarydefs.
  2152. >> 
  2153. >That's a good question. The only ABI differences that I know of
  2154. >whould be in the XTI extensions to libnsl. If not then, maybe the
  2155. >Mips ABI folks know.
  2156.  
  2157. dev.sw.abi is the development environment.
  2158. All its libraries go into /usr/lib/abi
  2159. All DSO's in /usr/lib/abi are for link purposes *only*.
  2160. Consequently, they contain only those symbols that are defined in
  2161. the ABI.
  2162.  
  2163. When you link a program and want to create an ABI compliant program,
  2164. you give cc/ld etc the -abi flag. This causes it to look for headers
  2165. in /usr/include/abi first and libraries in /usr/lib/abi. Appropriate
  2166. libraries are added to your liblist.
  2167.  
  2168. When you execute this abi program, all DSO's that get pulled in are
  2169. those in the standard search path (/lib, /usr/lib). eoe1.sw.svr4net
  2170. contains the execution environment for both abi and non-abi compliant
  2171. programs.
  2172.  
  2173. This split up allows us to add more symbols etc in DSOs that are present
  2174. in /usr/lib, but not export these to the ABI development environment.
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181. #38.
  2182. ------------------------------------------------------------
  2183.  
  2184.  
  2185.